Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[RFR] Update pytest #9198

Merged
merged 1 commit into from
Nov 5, 2019
Merged

Conversation

mshriver
Copy link
Member

@mshriver mshriver commented Aug 13, 2019

pytest 5.0.1 major upgrade.

  • various updates associated with this major version change
  • Update pytest_generate_tests and fixtures in test_datastore_analysis
  • Update parametrization for test_pytest_shortcuts
  • Move marker/fixture inclusion to conftest, and list it in entrypoints explicitly
  • Flattens plugin inclusion, instead of markers/filters being defined via pytest_plugins at various points in the framework
  • Define a bunch of markers that were never actually registered with pytest
  • Remove skip_selenium marker
  • Remove references to pytest.config
  • Move template fixtures, update tests
  • hookimpl decorator, change env mark for provider
  • rework the checking/handling of markers for provider fixture
  • resolve provider fixture lookup failures
  • DataProvider is where it shouldn't be, pytest_fixture_setup not replacing
  • Remove known failures from test_modules_importable
  • Update travis script options
  • Move BaseLoggedInPage view class definition
  • Remove duplicate chargeback destination
  • Update pre-commit package versions.

@mshriver mshriver force-pushed the update-pytest-uncollect branch from 86bb1f9 to eb64d8e Compare August 13, 2019 16:14
@izapolsk izapolsk self-requested a review August 13, 2019 16:16
@mshriver mshriver changed the title [WIP] Update pytest uncollect [WIPTEST] Update pytest uncollect Aug 15, 2019
@dajoRH dajoRH added WIP-testing and removed WIP labels Aug 15, 2019
@mshriver mshriver force-pushed the update-pytest-uncollect branch from eb64d8e to 0dace52 Compare August 15, 2019 17:12
@mshriver mshriver force-pushed the update-pytest-uncollect branch 3 times, most recently from faffc56 to 4b7d2c9 Compare August 20, 2019 12:13
@mshriver mshriver force-pushed the update-pytest-uncollect branch from 4b7d2c9 to 9c98b2c Compare August 28, 2019 15:39
@mshriver mshriver changed the title [WIPTEST] Update pytest uncollect [WIPTEST] Update pytest Aug 28, 2019
@mshriver mshriver changed the title [WIPTEST] Update pytest [RFR] Update pytest Aug 28, 2019
@john-dupuy john-dupuy changed the title [RFR] Update pytest [WIP] Update pytest Aug 30, 2019
@dajoRH dajoRH added the WIP label Aug 30, 2019
@john-dupuy
Copy link
Contributor

john-dupuy commented Aug 30, 2019

Many tests in the Jenkins job failed with the error

  def setup_provider(request, provider):
E       fixture 'provider' not found

Moving back to WIP for now.

@mshriver mshriver force-pushed the update-pytest-uncollect branch from 9c98b2c to 2ef921c Compare September 3, 2019 19:13
@mshriver mshriver force-pushed the update-pytest-uncollect branch from 7fcb6a2 to 44d7e9c Compare September 4, 2019 13:13
@dajoRH dajoRH added lint-ok and removed needs-lint labels Sep 4, 2019
@mshriver mshriver force-pushed the update-pytest-uncollect branch 2 times, most recently from 5b70a99 to 0711c9f Compare September 4, 2019 19:30
@mshriver mshriver force-pushed the update-pytest-uncollect branch from 7188a3d to 7cb4352 Compare October 30, 2019 15:37
@dajoRH dajoRH changed the title [RFR] Update pytest [WIP] Update pytest Oct 30, 2019
@mshriver mshriver force-pushed the update-pytest-uncollect branch from 7cb4352 to 128e1ec Compare October 30, 2019 18:08
@mshriver mshriver changed the title [WIP] Update pytest [RFR] Update pytest Oct 30, 2019
@dajoRH dajoRH changed the title [RFR] Update pytest [WIP] Update pytest Nov 4, 2019
@mshriver mshriver force-pushed the update-pytest-uncollect branch from 128e1ec to c3459e0 Compare November 4, 2019 15:01
@mshriver mshriver changed the title [WIP] Update pytest [RFR] Update pytest Nov 4, 2019
@dajoRH dajoRH removed the WIP label Nov 4, 2019
@mshriver
Copy link
Member Author

mshriver commented Nov 4, 2019

updates to tests/meta are getting rebased in as they come, it should be reviewable as the conflicts are trivial.

@dajoRH dajoRH changed the title [RFR] Update pytest [WIP] Update pytest Nov 4, 2019
various updates associated with this major version change

Update pytest_generate_tests and fixtures in test_datastore_analysis

Update parametrization for test_pytest_shortcuts

Move marker/fixture inclusion to conftest, and list it in entrypoints explicitly
Flattens plugin inclusion, instead of markers/filters being defined via pytest_plugins at various points in the framework

Define a bunch of markers that were never actually registered with pytest
Remove skip_selenium marker
Remove references to pytest.config

Move template fixtures, update tests

hookimpl decorator, change env mark for provider

rework the checking/handling of markers for provider fixture
resolve provider fixture lookup failures

DataProvider is where it shouldn't be, pytest_fixture_setup not replacing

Remove known failures from test_modules_importable

Update travis script options

Move BaseLoggedInPage view class definition

Remove duplicate chargeback destination

Update pre-commit package versions
@mshriver mshriver force-pushed the update-pytest-uncollect branch from c3459e0 to 8eca266 Compare November 5, 2019 13:34
@ManageIQ ManageIQ deleted a comment from dajoRH Nov 5, 2019
@mshriver mshriver changed the title [WIP] Update pytest [RFR] Update pytest Nov 5, 2019
@dajoRH
Copy link
Contributor

dajoRH commented Nov 5, 2019

I detected some fixture changes in commit 8eca266

Show fixtures

The local fixture appliance_preupdate is used in the following files:

  • cfme/tests/cli/test_appliance_update.py
    • test_update_yum

The global fixture multiple_preupdate_appliances was changed, but I didn't find where it's used.
The global fixture ha_multiple_preupdate_appliances was changed, but I didn't find where it's used.
The global fixture setup_provider_clsscope was changed, but I didn't find where it's used.
The global fixture template is used in the following files:

  • cfme/tests/cloud/test_providers.py
  • cfme/tests/cloud_infra_common/test_cloud_init_provisioning.py
  • cfme/tests/cloud_infra_common/test_genealogy.py
  • cfme/tests/cloud_infra_common/test_html5_vm_console.py
  • cfme/tests/cloud_infra_common/test_provisioning.py
  • cfme/tests/cloud_infra_common/test_retirement.py
  • cfme/tests/cloud_infra_common/test_vm_instance_analysis.py
  • cfme/tests/cloud_infra_common/test_vm_ownership.py
  • cfme/tests/configure/test_access_control.py
  • cfme/tests/infrastructure/test_delete_infra_object.py
  • cfme/tests/infrastructure/test_kubevirt.py
  • cfme/tests/infrastructure/test_provisioning_dialog.py
    • _provisioner
  • cfme/tests/infrastructure/test_provisioning_rest.py
  • cfme/tests/infrastructure/test_scvmm_specific.py
  • cfme/tests/infrastructure/test_snapshot.py
    • provision_vm
  • cfme/tests/infrastructure/test_vm_power_control.py
  • cfme/tests/infrastructure/test_vmware_provider.py
  • cfme/tests/infrastructure/test_webmks_console.py
  • cfme/tests/integration/test_ldap_auth.py
  • cfme/tests/intelligence/test_reports_with_timelines.py
  • cfme/tests/networks/test_provision_to_virtual_network.py
  • cfme/tests/pod/test_appliance_crud.py
  • cfme/tests/services/test_ansible_workflow_servicecatalogs.py
  • cfme/tests/services/test_config_provider_servicecatalogs.py
  • cfme/tests/services/test_different_dialogs_in_catalogs.py
  • cfme/tests/services/test_iso_service_catalogs.py
  • cfme/tests/services/test_orchestration_template.py
  • cfme/tests/services/test_provision_stack.py
  • cfme/tests/services/test_rest_services.py
  • cfme/tests/services/test_service_catalogs.py

The global fixture small_template is used in the following files:

  • cfme/tests/cloud/test_instance_power_control.py
    • testing_instance
    • testing_instance2
  • cfme/tests/cloud/test_tenant_quota.py
    • instance
  • cfme/tests/cloud_infra_common/test_genealogy.py
    • vm_crud
  • cfme/tests/cloud_infra_common/test_power_control_rest.py
    • vm_obj
  • cfme/tests/cloud_infra_common/test_provisioning.py
    • test_provision_with_additional_volume
  • cfme/tests/cloud_infra_common/test_retirement.py
    • retire_vm
  • cfme/tests/infrastructure/test_provisioning_rest.py
    • test_create_pending_provision_requests
    • test_provision_attributes
  • cfme/tests/infrastructure/test_scvmm_specific.py
    • vm
  • cfme/tests/infrastructure/test_snapshot.py
    • small_test_vm
  • cfme/tests/infrastructure/test_ssa_vddk.py
    • vm
  • cfme/tests/infrastructure/test_vm_ownership.py
    • small_vm
  • cfme/tests/integration/test_ldap_auth.py
  • cfme/tests/intelligence/test_reports_with_timelines.py
    • vm_crud
  • cfme/tests/storage/test_volume.py
    • instance_fixture

The global fixture small_template_modscope is used in the following files:

  • cfme/tests/cloud_infra_common/test_custom_attributes_rest.py
    • vm_obj
  • cfme/tests/cloud_infra_common/test_events.py
    • vm_crud
  • cfme/tests/cloud_infra_common/test_snapshots_rest.py
    • vm
  • cfme/tests/control/test_actions.py
    • vm
  • cfme/tests/infrastructure/test_provisioning_rest.py
    • provision_data
  • cfme/tests/infrastructure/test_quota_tagging.py
    • small_vm
  • cfme/tests/infrastructure/test_tenant_quota.py
    • small_vm
  • cfme/tests/services/test_add_remove_vm_to_service.py
    • new_vm

The global fixture full_template is used in the following files:

  • cfme/tests/control/test_alerts.py
    • ssh
  • cfme/tests/infrastructure/test_snapshot.py
    • full_test_vm
  • cfme/tests/infrastructure/test_vm_power_control.py
    • testing_vm_tools
  • cfme/tests/infrastructure/test_vm_reconfigure.py
    • full_vm

The global fixture full_template_modscope is used in the following files:

  • cfme/tests/ansible/test_embedded_ansible_actions.py
    • ansible_credential
  • cfme/tests/ansible/test_embedded_ansible_automate.py
    • ansible_credential
  • cfme/tests/control/test_compliance.py
    • compliance_vm

The global fixture big_template is used in the following files:

  • cfme/tests/ansible/test_embedded_ansible_services.py
    • new_vm

The global fixture big_template_modscope is used in the following files:

  • cfme/tests/control/test_actions.py
    • vm_big

The global fixture provisioning is used in the following files:

  • cfme/tests/automate/test_common_methods.py
    • testing_vm
  • cfme/tests/automate/test_service_automate.py
  • cfme/tests/cloud/test_delete_cloud_object.py
    • test_delete_stack_appear_after_refresh
  • cfme/tests/cloud/test_providers.py
    • test_vpc_env_selection
  • cfme/tests/cloud/test_quota.py
    • prov_data
    • test_custom_service_dialog_quota_flavors
  • cfme/tests/cloud/test_quota_tagging.py
    • template_name
    • prov_data
  • cfme/tests/cloud/test_tenant_quota.py
    • template_name
    • prov_data
    • catalog_item
  • cfme/tests/cloud_infra_common/test_cloud_init_provisioning.py
    • test_provision_cloud_init
    • test_provision_cloud_init_payload
  • cfme/tests/cloud_infra_common/test_provisioning.py
    • instance_args
  • cfme/tests/cloud_infra_common/test_vm_instance_analysis.py
  • cfme/tests/infrastructure/test_child_tenant.py
    • template_name
    • prov_data
  • cfme/tests/infrastructure/test_host_provisioning.py
  • cfme/tests/infrastructure/test_iso_provisioning.py
    • datastore_init
  • cfme/tests/infrastructure/test_kubevirt.py
    • temp_vm
    • test_k6t_vm_crud
  • cfme/tests/infrastructure/test_project_quota.py
    • template_name
    • prov_data
  • cfme/tests/infrastructure/test_provisioning_dialog.py
    • prov_data
    • test_provision_vm_with_2_nics
  • cfme/tests/infrastructure/test_pxe_provisioning.py
    • setup_pxe_servers_vm_prov
  • cfme/tests/infrastructure/test_tenant_quota.py
    • template_name
    • prov_data
  • cfme/tests/networks/test_provision_to_virtual_network.py
  • cfme/tests/perf/workloads/test_provisioning.py
  • cfme/tests/services/test_cloud_service_catalogs.py
  • cfme/tests/services/test_different_dialogs_in_catalogs.py
    • catalog_item
  • cfme/tests/services/test_iso_service_catalogs.py
    • setup_iso_datastore
    • catalog_item
  • cfme/tests/services/test_operations.py
  • cfme/tests/services/test_provision_stack.py
    • stack_data
    • template
  • cfme/tests/services/test_pxe_service_catalogs.py
    • setup_pxe_servers_vm_prov
    • catalog_item
  • cfme/tests/services/test_service_catalogs.py
    • test_no_template_catalog_item
  • cfme/tests/services/test_tower_manual.py

The global fixture console_template is used in the following files:

  • cfme/tests/cloud_infra_common/test_html5_vm_console.py
    • vm_obj
  • cfme/tests/infrastructure/test_webmks_console.py
    • vm_obj
    • ssh_client
  • cfme/tests/ssui/test_ssui_myservice.py

The global fixture console_template_modscope was changed, but I didn't find where it's used.
The global fixture ubuntu16_template is used in the following files:

  • cfme/tests/v2v/test_v2v_migrations_single_vcenter.py

The global fixture ubuntu16_template_modscope was changed, but I didn't find where it's used.
The global fixture rhel69_template is used in the following files:

  • cfme/tests/v2v/test_migration_throttling.py
  • cfme/tests/v2v/test_v2v_migrations_single_vcenter.py

The global fixture rhel69_template_modscope was changed, but I didn't find where it's used.
The global fixture rhel74_template was changed, but I didn't find where it's used.
The global fixture rhel74_template_modscope was changed, but I didn't find where it's used.
The global fixture win7_template was changed, but I didn't find where it's used.
The global fixture win7_template_modscope was changed, but I didn't find where it's used.
The global fixture win10_template was changed, but I didn't find where it's used.
The global fixture win10_template_modscope was changed, but I didn't find where it's used.
The global fixture win2012_template was changed, but I didn't find where it's used.
The global fixture win2012_template_modscope was changed, but I didn't find where it's used.
The global fixture win2016_template was changed, but I didn't find where it's used.
The global fixture win2016_template_modscope was changed, but I didn't find where it's used.
The global fixture dual_network_template was changed, but I didn't find where it's used.
The global fixture dual_network_template_modscope was changed, but I didn't find where it's used.
The global fixture dual_disk_template was changed, but I didn't find where it's used.
The global fixture dual_disk_template_modscope was changed, but I didn't find where it's used.
The global fixture dportgroup_template was changed, but I didn't find where it's used.
The global fixture dportgroup_template_modscope was changed, but I didn't find where it's used.
The global fixture rhel7_minimal is used in the following files:

  • cfme/tests/v2v/test_migration_throttling.py
  • cfme/tests/v2v/test_v2v_cancel_migrations.py
  • cfme/tests/v2v/test_v2v_migrations_single_vcenter.py

The global fixture rhel7_minimal_modscope was changed, but I didn't find where it's used.
The local fixture config_manager is used in the following files:

  • cfme/tests/services/test_config_provider_servicecatalogs.py
    • catalog_item
    • test_order_tower_catalog_item

The local fixture datastore is used in the following files:

  • cfme/tests/infrastructure/test_datastore_analysis.py
    • datastores_hosts_setup
    • test_run_datastore_analysis

The local fixture datastores_hosts_setup is used in the following files:

  • cfme/tests/infrastructure/test_datastore_analysis.py
    • test_run_datastore_analysis

The local fixture temp_pod_appliance is used in the following files:

  • cfme/tests/pod/test_appliance_crud.py
    • setup_ipa_auth_provider
    • ipa_user
    • aws_provider
    • new_ssa_image
    • temp_ssa_pod_appliance
    • test_crud_pod_appliance
    • test_pod_appliance_start_stop
    • test_pod_appliance_db_backup_restore
    • test_pod_appliance_basic_ipa_auth

The local fixture temp_pod_ansible_appliance is used in the following files:

  • cfme/tests/pod/test_appliance_crud.py

The local fixture tower_manager is used in the following files:

  • cfme/tests/services/test_ansible_workflow_servicecatalogs.py
    • ansible_workflow_catitem
    • test_tower_workflow_item

Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃

@jawatts
Copy link
Contributor

jawatts commented Nov 5, 2019

PR looks good, any fallout will be handled by @mshriver in other PRs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants